Creating a Script

Quick Fields contains a powerful Script Editor that enables you to write VB.NET and C# scripts. Follow the steps below to create a new script.

Tip: It is important to consider the impact a script could have on the performance of your session. For events associated with documents, the script will run once for each document. For events associated with pages, the script will run once for each page. For example, if you called the e.API.ShowMessageBox method inside the OnPageCreated method, and then scanned a 200 page document, the message box would appear 200 times. 

Note: For the most part, Quick Fields does not interact with a Laserfiche repository until documents are stored. As a result, if your script needs to connect to your Laserfiche repository, you must provide the connection yourself using standard Laserfiche Toolkit code. For more information on Laserfiche Server Objects, see the Laserfiche Toolkit documentation.

To create a script

  1. Within an open Quick Fields session, select Script Editor under Tools in the menu bar.
  2. You may be prompted to choose a programming language: Visual Basic (VB.NET) or C#. Choose one.

    Tip: You can also control this setting by selecting Tools, Options, Current Session, General and configuring Scripting Options. The language setting is tied to the session that is currently open, not to Quick Fields in general.

  3. Right-click one of the event folders in the Project Explorer pane, point to Add, and select Quick Fields Script.
  4. In the Select a Scripting Event dialog box, select the appropriate event for your script. In most cases, the name of the event you select will match the name of folder you right-clicked in the previous step. Select OK.

    Note: When you create a script, it is assigned to, and only available within, the active session. For example, the scripts you create in Session 1 will not available to Session 2.

  5. A new tab will appear in the Script pane, inside of which will be some code that will include:


For further help or feedback, please see the Laserfiche Support Site. © 2009 Laserfiche. All Rights Reserved.